<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="UTF-8">
<title>上传文件</title>
<link rel="stylesheet" href="${ pageContext.request.contextPath }/css/bootstrap.css" />
<script type="text/javascript" src="${ pageContext.request.contextPath }/js/jquery-1.11.0.js"></script>
<script type="text/javascript" src="${ pageContext.request.contextPath }/js/bootstrap.min.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
	<div class="container">
		<jsp:include page="../header.jsp"></jsp:include>
		<!--表单的enctype属性要设置为multipart/form-data-->
		<form action="http://localhost:8080/onnew2/uploadServlet" method="post" enctype="multipart/form-data">
		    <table width="600">
		        <tr>
		            <td>上传者</td>
		            <td><input type="text" name="name"/></td>
		        </tr>
		        <tr>
		            <td>上传文件</td>
		            <td><input type="file" name="myfile"/></td>
		        </tr>
		        <tr>
		            <!--设置单元格可横跨的列数。-->
		            <td colspan="2"><input type="submit" value="上传"/></td>
		        </tr>
		    </table>
		</form>
		<jsp:include page="../footer.jsp"></jsp:include>
	</div>
</body>
</html>

